package com.sqltojson.resource;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;

import com.sqltojson.core.Resultat;

/**
 * Resource pour executer des requetes.
 */
@Path("/resource")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public interface Request {
	
	/**
	 * @param nameQuery le nom de la requete a executer
	 * @return l'ensemble des valeurs
	 * @throws WebApplicationException
	 */
	@GET
	@Path("/query/{nameQuery}")
	public Resultat query(@PathParam("nameQuery") String nameQuery, @Context UriInfo ui) throws WebApplicationException;
	
}
